#include <iostream>
#include <string>

using namespace std;

int main ()
{
	int skobki_open = 0;
	int skobki_close = 0;
	
	string skobki;
    cout << "Vvedite posledovatelnost skobok: "; 
    cin >> skobki;
    
    for (char c : skobki)
    {
    	if (c =='(') skobki_open++;
    	if (c ==')') skobki_close++;
	}
	cout << "Open: " <<	skobki_open << endl;
	cout << "Close: " << skobki_close << endl;
}